#pragma once
/*!
 * \file Node_CharacterClass.h
 * \brief Contains definition of Node_CharacterClass class.
 */
#include "node.h"
#include <list>

using namespace std;

/*!
 * A class describes node of tree of regular expression, which is a character class.
 */
class Node_CharacterClass :	public Node
{
public:
	/*!
     * A default constructor for Node_CharacterClass.
     */
	Node_CharacterClass(void);

    /*!
     * An extended constructor for Node_CharacterClass.
     * \param[in] data Data for Node_CharacterClass.
     * \param[in] id ID for Node_CharacterClass.
     * \param[in] type Type for Node_CharacterClass.
	 * \param[in] leftB Left border for Node_CharacterClass.
	 * \param[in] rightB Right border for Node_CharacterClass.
     */
	Node_CharacterClass(const string & data, const unsigned int & id, const Nodetype & type, const list<int> & leftB, const list<int> & rightB);

	/*!
     * A default destructor for Node_CharacterClass.
     */
	~Node_CharacterClass(void);

	/*!
     * Inverts the symbol codes in Node_CharacterClass.
     */
	void invertCodes();

	/*!
	 * Returns a random character from Node_CharacterClass.
	 * \return Symbol from Node_CharacterClass.
	 */
	string getCharacter() const;
	
    /*!
     * "Get" method for left border.
     * \return Left border of Node.
     */
	list<int> getLeftBorder() const;

	/*!
     * "Get" method for right border.
     * \return Right border of Node.
     */
	list<int> getRightBorder() const;

	/*!
     * "Set" method for left border.
     * \param[in] brd Left border of Node.
     */
	void setLeftBorder(list<int> & brd);

	/*!
     * "Set" method for right border.
     * \param[in] brd Right border of Node.
     */
	void setRightBorder(list<int> & brd);

private:
	list<int> leftBorder; /*!< left border of character class. */
	list<int> rightBorder;/*!< right border of character class. */
};